<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试异步请求</title>
    <script src="../js/jquery-3.5.1.js"></script>
    <script>
        function send(){
            $.get("/test/testAjax",{name:'yao',age:20},function (data) {
                    data=$.parseJSON(data);
                   alert(data);
                   alert(data.code);
                   alert(data.msg);
            });
        }
    </script>
</head>
<body>
<button onclick="send()">发送异步请求</button>
</body>
</html>